\usepackage{minted}
\definecolor{bg}{rgb}{0.92,0.95,0.95}
\usepackage{minted}
\definecolor{bg}{rgb}{0.92,0.95,0.95}
\newcommand{\outpython}
{
	\inputminted
		[
			breakafter=true,
			breakautoindent=true,
			fontfamily=courier,
			linenos,numbersep=5pt,
			showspaces=false,
			showtabs=false,
			bgcolor=bg,
			breaklines=true,
			python3=true
		]{python}
}
\newminted{python}
{
	breakafter=true,
	breakautoindent=true,
	fontfamily=courier,
	linenos,
	numbersep=5pt,
	showspaces=false,
	showtabs=false,
	bgcolor=bg,
	breaklines=true,
	python3=true
}
%----------外部代码-------------
\outpython{filename}

%----------内部代码-------------
\begin{pythoncode}
\end{pythoncode}

